<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app">
    <input type="button" value="点击" @click="doIt('老铁',666)">
    <input type="text" @keyup.enter="sayHi">
</div>
<script src="js/vue.js"></script>
<script>
    var app = new Vue({
        el:"#app",
        methods:{
            doIt:function (p1,p2){
                console.log("做it");
                console.log(p1);
                console.log(p2);
            },
            sayHi:function (){
                alert("你好呀！陌生人")
            }
        },
    })
</script>
</body>
</html>